﻿Imports DevExpress.XtraSplashScreen
Public Class TonQuy
    Private Sub LoadDuLieu()
        SplashScreenManager.ShowForm(GetType(WaitForm1))
        Me.DMThoiGianTableAdapter.Fill(Me.PCV_CLINICDataSet_Don.DMThoiGian)
        Me.GetTCTonQuyTableAdapter.Fill(Me.PCV_CLINICDataSetTongHop.getTCTonQuy, CDate(Me.TuNgayIDateEdit.EditValue), CDate(Me.DenNgayIDateEdit.EditValue))
        Me.setHeaderFooter(Main.TenDoanhNghiep.ToString, Main.DiaChiDoanhNghiep.ToString)
        SplashScreenManager.CloseForm()
    End Sub
    Private Sub TonQuy_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.ThoiGianISearchLookupEdit.EditValue = "TN"
        LoadDuLieu()
    End Sub
    Private Sub BarButtonItemBaoCao_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItemBaoCao.ItemClick
        Me.setHeaderFooter(Main.TenDoanhNghiep.ToString, Main.DiaChiDoanhNghiep.ToString)
        Me.IGridView1.setTitle("Tồn quỹ tháng " & Format(CDate(Me.TuNgayIDateEdit.EditValue).Month, "00") & "/" & CDate(Me.TuNgayIDateEdit.EditValue).Year)
        Me.IGridView1.inNhanh()
    End Sub
    Private Sub ThoiGianISearchLookupEdit_EditValueChanged(sender As Object, e As EventArgs) Handles ThoiGianISearchLookupEdit.EditValueChanged
        setDMThoiGian(Me.ThoiGianISearchLookupEdit, TuNgayIDateEdit, DenNgayIDateEdit)
        LoadDuLieu()
    End Sub

    Private Sub BarButtonItemLamTuoi_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItemLamTuoi.ItemClick
        LoadDuLieu()
    End Sub
End Class
